/*
 * @Description:
 * @Author: Richeneen
 * @Date: 2022-10-15 16:28:01
 * @LastEditTime: 2022-10-25 18:38:48
 * @LastEditors: liqi
 */
import { queryCategory } from '@/api/infoCategory'
export default {
  namespaced: true,
  state: {
    categories: []
  },
  mutations: {
    SET_CATEGORY(state, payload) {
      state.categories = payload
    }
  },
  actions: {
    async queryCategory({ commit }, params) {
      const res = await queryCategory(params)
      // console.log(res);
      commit('SET_CATEGORY', res.data)
    }
  }

}
